﻿@if (Request.IsAuthenticated) {
    <text>
        @*Hello, @Html.ActionLink(User.Identity.Name, "Manage", "Account", routeValues: null, htmlAttributes: new { @class = "username", title = "Manage" })!*@
        @using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm", @class = "navbar-form pull-right" }))
        {
            <span style="color:#80AAFF">@User.Identity.Name</span>
            @Html.AntiForgeryToken()
            <a href="javascript:document.getElementById('logoutForm').submit()">Log off</a>
        }
    </text>
} else {
    <div class="navbar-form pull-right">
        @if (Environment.MachineName.Equals("SG-ZXONG-D7", StringComparison.InvariantCultureIgnoreCase))
        {
            Html.ActionLink("Register", "Register", "Account", routeValues: null, htmlAttributes: new { id = "registerLink" });
            <text>&nbsp; &nbsp; &nbsp; &nbsp;</text>
        }
        @Html.ActionLink("Log in", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" })
    </div>
}
